package employeeTask;

public class Task {
	
   //fubar
	private static final int MINIMUM_WORKING_HOURS = 0;
	private static final String DEFAULT_TASK = "Default Task";
	private static final int MAX_WORKING_HOURS = 1024;
	private String name;
	
	//how much time is required for this task
	private int workingHours;
	
	public Task(String name, int workingHours) {
		if (name != null && !name.equals(""))
			this.name = name;
		else
			this.name = DEFAULT_TASK;
		
		if (MINIMUM_WORKING_HOURS <= workingHours && workingHours <= MAX_WORKING_HOURS)
			this.workingHours = workingHours;
		else
			this.workingHours = MINIMUM_WORKING_HOURS;
	}
	
	/**
	 * @return the workingHours
	 */
	public int getWorkingHours() {
		return workingHours;
	}
	/**
	 * @param workingHours the workingHours to set
	 */
	public void setWorkingHours(int workingHours) {
		if (MINIMUM_WORKING_HOURS <= workingHours && workingHours <= MAX_WORKING_HOURS)
			this.workingHours = workingHours;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	
}
